package cn.xn.hrms.infrastructure.dao;

import java.util.Collection;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.xn.hrms.api.dto.res.UserRoleDTO;

public interface UserRoleDao {

    List<UserRoleDTO> findAllByUserId(@Param("userId")Long userId);

    int insertList(@Param("list") List<UserRoleDTO> list);

    int updateIsDeletedByRoleIdIn(@Param("updatedIsDeleted")Integer updatedIsDeleted,
                                  @Param("roleIdCollection")Collection<Integer> roleIdCollection);
    int updateIsDeletedByUserIdIn(@Param("updatedIsDeleted")Integer updatedIsDeleted,
                                  @Param("userIdCollection")Collection<Integer> userIdCollection);

}
